<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>1.let声明变量</title>
</head>
<body>
<script>
     //变量声明
    let a;
    let d,b,c;
    let e = 100;
    let f = 521, g ='i love you';

    //不能重复声明
    // let n1 = 1;
    // let n1 = 2;
     
     //块级作用域
     // {
     //     var girl = 'xiaomei'
     //     // let girl = 'xiaomei'
     // }
     // console.log(girl)

     //var 的变量提升
     // console.log(name)
     // var name = 'zzl'

     //let 不存在变量提升
     // console.log(name)
     // let name = 'zzl'

     //let 不会影响作用域链
     {
         let abc = 'abc'
         function con() {
             console.log(abc)
         }
         con()
     }
</script>
</body>
</html>